﻿<%@ Page Language="C#" MasterPageFile="~/master/ThreeColumnLayout.master" AutoEventWireup="true" CodeFile="productlist.aspx.cs" Inherits="page_public_productlist" Title="Untitled Page" %>
<%@ Register Src="~/control/VerticalMenu.ascx" TagPrefix="ucc" TagName="verticalMenu" %>
<%@ Register Src="~/control/VerticalAdvertise.ascx" TagPrefix="ucc" TagName="verticalAdvertise" %>
<%@ Register Src="~/control/common/DataPager.ascx" TagPrefix="ucc" TagName="dataPager" %>

<asp:Content ID="ContentLeft" ContentPlaceHolderID="LeftPlaceHolder" Runat="Server">
    <ucc:verticalMenu ID="leftMenu" runat="server" />
</asp:Content>
<asp:Content ID="ContentMiddle" ContentPlaceHolderID="MiddlePlaceHolder" Runat="Server">
    <table border="0" cellpadding="0" cellspacing="0" width="510px" align="center">
        <tr>
            <td>
                <asp:DataList ID="productList" RepeatDirection="Horizontal" RepeatColumns="2" DataKeyField="Id" 
                    runat="server" CellSpacing="5" CellPadding="5" >
                    <ItemTemplate>
                        <div class="productListItem">
                            <table class="pltable" style="width:100%" >
                                <tr>
                                    <td colspan="2">
                                        <a class="productname" href='productdetail.aspx?id=<%# DataBinder.Eval(Container.DataItem, "id")%>' >
                                            <%# DataBinder.Eval(Container.DataItem, "product_name")%>
                                        </a>
                                    </td>
                                </tr>
                                <tr>
                                    <td rowspan="4" align="left" style="width:85px;" >
                                        <a href='productdetail.aspx?id=<%# DataBinder.Eval(Container.DataItem, "id")%>' >
                                            <asp:Image runat="server" ID="productImage" AlternateText="product image"
                                                Style="width:80px;border:1px solid #B1B1B1" 
                                                ImageUrl='<%# ((string)DataBinder.Eval(Container.DataItem, "default_image_url")).Replace("mid","thumb")%>'/>
                                        </a>
                                  
                                    </td>
                                </tr>
                                <tr>
                                    <td  valign="top">
                                        <%# DataBinder.Eval(Container.DataItem, "price_low")%>&nbsp;tk.
                                        &nbsp;-&nbsp;
                                        <%# DataBinder.Eval(Container.DataItem, "price_high")%>&nbsp;tk.
                                    </td>
                                </tr>
                                <tr>
                                    <td  valign="top">
                                        <a href='shopdetail.aspx?id=<%# DataBinder.Eval(Container.DataItem, "shop_id")%>'>
                                            <%# DataBinder.Eval(Container.DataItem, "shop_name")%></a>
                                    </td>
                                </tr>                
                                <tr>
                                    <td valign="top">
                                         <%# MaleOrFemale(DataBinder.Eval(Container.DataItem, "for_male"))%>
                                    </td>
                                </tr>
                                <tr style="height:60px;" valign="top">
                                    <td colspan="2" class="normalText">
                                        <%# Pheonix.CodeLibrary.Utility.ShortenText((string)DataBinder.Eval(Container.DataItem, "product_description"),200)%>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2" align="right">
                                        <a href='productdetail.aspx?id=<%# DataBinder.Eval(Container.DataItem, "id")%>'><i>more</i></a>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </ItemTemplate>
                </asp:DataList>
            </td>
        </tr>
        <tr>
            <td align="right">
                <ucc:dataPager ID="dataPager" runat="server" PageSize="5" MaxPageLinks="5" />
            </td>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="ContentRight" ContentPlaceHolderID="RightPlaceHolder" Runat="Server">
    <ucc:verticalAdvertise ID="rightAdvertise" runat="server" ContentType="HomePageVerticalAdvertisement" />
</asp:Content>

